package com.hj.homework;

public class Rectangle {
    private double length;
    private double width;

    public void setLength(double chang){
        length = chang;
    }
    public double getLength(){
        return length;
    }
    public void setWidth(double kuan){
        width = kuan;
    }
    public double getWidth(){
        return width;
    }

    public double getArea(){
        return length * width;
    }
    public double getPerimeter(){
        return 2 * (length + width);
    }
    public String getInfo(){
        return "长：" + length + "，宽：" + width + "，面积：" + getArea() + "，周长：" + getPerimeter();
    }
}
